import xlsxwriter
import os

path = os.path.join(os.path.abspath(''),'xlsxwriter_0818.xlsx')

# workbook = xlsxwriter.Workbook(path)
# worksheet = workbook.add_worksheet('测试')
# worksheet.write('D7','ZSYGCS')
#
# workbook.close()

# workbook_test = xlsxwriter.Workbook(path)
# worksheet_test = workbook_test.add_worksheet('动画')
#
# list_test = ['陈','韩','黄','田','赵']
# worksheet_test.write_row(0,0,list_test)
# workbook_test.close()


# workbook_test1 = xlsxwriter.Workbook(path)
# worksheet_test1 = workbook_test1.add_worksheet('动画1')
# list_column = list(range(10))
# worksheet_test1.write_column(0,0,list_column)
# workbook_test1.close()
#
# path_file = os.startfile(path)


wb = xlsxwriter.Workbook(path)
st = wb.add_format({'align':'center','bold':1,'bg_color':'#ff0000'})


ws = wb.add_worksheet('rig')
col1 = list(range(10))
col2 = list(range(10,20))
col3 = list(range(20,30))
ws.write_column(0,0,col1)
ws.write_column(0,1,col2)
ws.write_column(0,2,col3)
ws.merge_range(0,0,2,3,'rig',st)



wb.close()
os.startfile(path)